package com.ruoyi.wisdom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wisdom.mapper.IotStudentParentMapper;
import com.ruoyi.wisdom.domain.IotStudentParent;
import com.ruoyi.wisdom.service.IIotStudentParentService;

/**
 * 家长管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-31
 */
@Service
public class IotStudentParentServiceImpl implements IIotStudentParentService 
{
    @Autowired
    private IotStudentParentMapper iotStudentParentMapper;

    /**
     * 查询家长管理
     * 
     * @param id 家长管理主键
     * @return 家长管理
     */
    @Override
    public IotStudentParent selectIotStudentParentById(Long id)
    {
        return iotStudentParentMapper.selectIotStudentParentById(id);
    }

    /**
     * 查询家长管理列表
     * 
     * @param iotStudentParent 家长管理
     * @return 家长管理
     */
    @Override
    public List<IotStudentParent> selectIotStudentParentList(IotStudentParent iotStudentParent)
    {
        return iotStudentParentMapper.selectIotStudentParentList(iotStudentParent);
    }

    /**
     * 新增家长管理
     * 
     * @param iotStudentParent 家长管理
     * @return 结果
     */
    @Override
    public int insertIotStudentParent(IotStudentParent iotStudentParent)
    {
        iotStudentParent.setCreateTime(DateUtils.getNowDate());
        return iotStudentParentMapper.insertIotStudentParent(iotStudentParent);
    }

    /**
     * 修改家长管理
     * 
     * @param iotStudentParent 家长管理
     * @return 结果
     */
    @Override
    public int updateIotStudentParent(IotStudentParent iotStudentParent)
    {
        iotStudentParent.setUpdateTime(DateUtils.getNowDate());
        return iotStudentParentMapper.updateIotStudentParent(iotStudentParent);
    }

    /**
     * 批量删除家长管理
     * 
     * @param ids 需要删除的家长管理主键
     * @return 结果
     */
    @Override
    public int deleteIotStudentParentByIds(Long[] ids)
    {
        return iotStudentParentMapper.deleteIotStudentParentByIds(ids);
    }

    /**
     * 删除家长管理信息
     * 
     * @param id 家长管理主键
     * @return 结果
     */
    @Override
    public int deleteIotStudentParentById(Long id)
    {
        return iotStudentParentMapper.deleteIotStudentParentById(id);
    }
}
